<?php
    defined('M2_MICRO') or die('Direct Access to this location is not allowed.');

    /**
      * @desc Model class
      * @package M2 Micro Framework
      * @author Alexander Chaika
      */
    class Model extends Error {
        private $cid;

        /**
          * Model class constructor
          * @param array $config
          */
        public function __construct() {
            global $database, $config;

            // setup DB connection
            if (empty($this->cid)) {
                $this->cid = $database->connect($config);
            }
        }
    }
?>
